<nav class="navbar navbar-expand-md">
    <div class="navbar-brand">
        <a href="https://twitter.com/piranhacms" target="blank"><img src="~/assets/img/twitter.png"></a>
        <a href="https://github.com/piranhacms/piranha.core" target="blank"><img src="~/assets/img/github.png"></a>
    </div>
    <button class="navbar-toggler navbar-toggler-right collapsed" type="button" data-toggle="collapse" data-target="#mobileNavbar" aria-controls="mobileNavbar" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon">&#9776;</span>
    </button>
    <div class="navbar-collapse collapse" id="mobileNavbar">
        <ul class="justify-content-center navbar-nav mr-auto">

            @foreach (var item in WebApp.Site.Sitemap)
            {
                if (!item.IsHidden)
                {
                    <li class="nav-item @(item.Id == WebApp.PageId || item.HasChild(WebApp.PageId) ? "active" : "")">
                        <a class="nav-link" href="@item.Permalink">@item.MenuTitle</a>
                    </li>
                }
            }
        </ul>
    </div>
</nav>
